package com.example.searchcenter.activity;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import com.example.searchcenter.activity.NewActivities;

public class TabsDetailsAdapter extends FragmentPagerAdapter {

	public TabsDetailsAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int index) {

		switch (index) {
		case 0:
			// New Activities fragment activity
			return new NewActivities();
		case 1:
			// Introduce fragment activity
			return new OldActivities();
		}

		return null;
	}

	@Override
	public int getCount() {
		// get item count - equal to number of tabs
		return 2;
	}

}
